package com.ceba.test.base.dbdata.modules;

import com.ceba.base.dbdata.DataTableObject;
import com.ceba.base.dbdata.MysqlUtils;

/*
 * 激活模块
 */
public class ActiviDb {

	public static void init() throws Exception{

		//11-start
		DataTableObject lic_enterprise=new DataTableObject("lic_enterprise");
		lic_enterprise.addField("ID", "varchar(32)", "NOT NULL", "", "true");
		lic_enterprise.addField("ENTERPRISE_NAME", "varchar(255)", "", "", "false");
		lic_enterprise.addField("PC_CODES", "varchar(200)", "", "", "false");
		lic_enterprise.addField("ENTERPRISE_ID", "varchar(32)", "", "", "false");
		lic_enterprise.addField("CREATE_USER", "varchar(32)", "", "", "false");
		lic_enterprise.addField("CREATE_TIME", "datetime", "", "", "false");
		lic_enterprise.addField("UPDATE_USER", "varchar(32)", "", "", "false");
		lic_enterprise.addField("UPDATE_TIME", "datetime", "", "", "false");
		lic_enterprise.addField("SPARE1", "varchar(100)", "DEFAULT NULL", "", "false");
		lic_enterprise.addField("SPARE2", "varchar(100)", "DEFAULT NULL", "", "false");
		lic_enterprise.addField("SPARE3", "varchar(100)", "DEFAULT NULL", "", "false");
		MysqlUtils.syncTableStructure(lic_enterprise);
		//end

		//-start
		DataTableObject enterprise=new DataTableObject("enterprise");
		enterprise.addField("ID", "varchar(32)", "NOT NULL", "", "true");
		enterprise.addField("ENTERPRISE_NAME", "varchar(255)", "DEFAULT NULL", "", "false");
		enterprise.addField("ENTERPRISE_EMAIL", "varchar(255)", "DEFAULT NULL", "", "false");
		enterprise.addField("ENTERPRISE_PHONE", "varchar(255)", "DEFAULT NULL", "", "false");
		enterprise.addField("ACTIVATE_CODE", "varchar(255)", "DEFAULT NULL", "", "false");
		enterprise.addField("CREATE_USER", "varchar(32)", "DEFAULT NULL", "", "false");
		enterprise.addField("CREATE_TIME", "datetime", "DEFAULT NULL", "", "false");
		MysqlUtils.syncTableStructure(enterprise);
		//end

		//-start
		DataTableObject g_lic_log=new DataTableObject("g_lic_log");
		g_lic_log.addField("ID", "varchar(32)", "NOT NULL", "", "true");
		g_lic_log.addField("AVAILABLE_DATE", "varchar(20)", "DEFAULT NULL", "", "false");
		g_lic_log.addField("ALL_SIGN_NUM", "varchar(255)", "DEFAULT NULL", "", "false");
		g_lic_log.addField("SUBORDINATE_SERVICE", "varchar(255)", "DEFAULT NULL", "", "false");
		g_lic_log.addField("KEY_MODE", "varchar(255)", "DEFAULT NULL", "", "false");
		g_lic_log.addField("CREATE_PDF_MODE", "varchar(255)", "DEFAULT NULL", "", "false");
		g_lic_log.addField("CERTIFICATE_EXPIRY_TIME", "varchar(255)", "DEFAULT NULL", "", "false");
		g_lic_log.addField("CREATE_TIME", "datetime", "DEFAULT NULL", "", "false");
		MysqlUtils.syncTableStructure(g_lic_log);
		//end

		//-start
		DataTableObject g_enterprise_lic=new DataTableObject("g_enterprise_lic");
		g_enterprise_lic.addField("ID", "varchar(32)", "NOT NULL", "", "true");
		g_enterprise_lic.addField("FK_ENTERPISE_ID", "varchar(32)", "NOT NULL", "", "true");
		g_enterprise_lic.addField("ALLOW_LOGIN_DATE", "varchar(200)", "", "", "true");
		g_enterprise_lic.addField("ALLOW_SIGN_NUM", "varchar(255)", "DEFAULT 'z5Mh21pCDriXghUULK+ehw=='", "", "true");
		g_enterprise_lic.addField("ALL_SIGN_NUM", "varchar(200)", "DEFAULT '0'", "", "true");
		g_enterprise_lic.addField("SIGNED_COUNT", "varchar(255)", "", "", "true");
		g_enterprise_lic.addField("REMOTE_NEW_SIGN_COUNT", "varchar(255)", "", "", "true");
		g_enterprise_lic.addField("ACTIVE_TIMES", "varchar(255)", "DEFAULT '2'", "", "true");
		g_enterprise_lic.addField("ONLINE_WORKER", "varchar(500)", "", "", "true");
		g_enterprise_lic.addField("SIGN_VALIDITY", "varchar(200)", "", "", "true");
		g_enterprise_lic.addField("FORMAL_USE_TIME", "varchar(200)", "", "", "true");
		g_enterprise_lic.addField("SYSTEM_TYPE", "varchar(200)", "DEFAULT 'j6Mb2jOc/1C1ONF0fJR0Pw=='", "", "true");
		g_enterprise_lic.addField("SYSTEM_FEE_TYPE", "varchar(200)", "DEFAULT '1'", "", "true");
		g_enterprise_lic.addField("USE_VERSION", "varchar(200)", "DEFAULT '5'", "", "true");
		g_enterprise_lic.addField("CUSTOMER_GROUP", "varchar(2)", "DEFAULT '1'", "", "true");
		g_enterprise_lic.addField("SHCA_KEY_FLAG", "varchar(2)", "DEFAULT '0'", "", "true");
		g_enterprise_lic.addField("SVN_VERSION", "varchar(200)", "", "", "true");
		g_enterprise_lic.addField("VERSION", "varchar(100)", "", "", "true");
		g_enterprise_lic.addField("SMT_SYSTEM_DEFAULTS_LANGUAGE", "varchar(100)", "DEFAULT 'zh_CN'", "", "true");
		g_enterprise_lic.addField("SYSTEM_DEFAULTS_LANGUAGE", "varchar(100)", "DEFAULT 'zh_CN'", "", "true");
		g_enterprise_lic.addField("SYSTEM_PRODUCT_NAME", "varchar(100)", "", "", "true");
		g_enterprise_lic.addField("IDS_SERVER_PORT", "varchar(50)", "DEFAULT '8080'", "", "true");
		g_enterprise_lic.addField("NETTY_SERVER_IP", "varchar(50)", "", "", "true");
		g_enterprise_lic.addField("NETTY_SERVER_PORT", "varchar(50)", "", "", "true");
		g_enterprise_lic.addField("WATERMARK_OVERCONTENT_FLAG", "varchar(20)", "DEFAULT 'false'", "", "true");
		g_enterprise_lic.addField("LOGIN_TYPE", "varchar(2)", " DEFAULT '0'", "", "true");
		g_enterprise_lic.addField("FILE_STORAGE_FALG", "varchar(2)", "DEFAULT '2'", "", "true");
		g_enterprise_lic.addField("PDF_CREATE_MODE", "varchar(50)", "DEFAULT 'sockect'", "", "true");
		g_enterprise_lic.addField("PATTER_LOGO_FLAG", "varchar(2)", "DEFAULT '0'", "", "true");
		g_enterprise_lic.addField("ZIP_DOWN_MAX_SIZE", "varchar(50)", "DEFAULT '42428800'", "", "true");
		g_enterprise_lic.addField("MAX_SIZE", "varchar(50)", "DEFAULT '10'", "", "true");
		g_enterprise_lic.addField("PDF_TRANSFORM_URL", "varchar(100)", "DEFAULT 'http://localhost:8383/fileToPdf.asmx/fileToPdf'", "", "true");
		g_enterprise_lic.addField("PDF_TRANSFORM_SOCKET_PORT", "varchar(32)", "DEFAULT '18698'", "", "true");
		g_enterprise_lic.addField("GROUP_MANAGER_FLAG", "varchar(2)", " DEFAULT '2'", "", "true");
		g_enterprise_lic.addField("SE_GROUP_FLAG", "varchar(2)", "DEFAULT '0'", "", "true");
		g_enterprise_lic.addField("SE_DELETE_SINGLE_FLAG", "varchar(2)", "DEFAULT '0'", "", "true");
		g_enterprise_lic.addField("MAX_PAGE", "varchar(50)", "DEFAULT '10'", "", "true");
		g_enterprise_lic.addField("PUBLIC_KEY_FLAG", "varchar(2)", "DEFAULT '0'", "", "true");
		g_enterprise_lic.addField("BATCH_SIGN", "varchar(20)", "DEFAULT 'false'", "", "true");
		g_enterprise_lic.addField("SEND_MAIL_MAX_SIZE", "varchar(20)", "DEFAULT '10485760'", "", "true");
		g_enterprise_lic.addField("MERGE_MAX_COUNT", "varchar(20)", " DEFAULT '5'", "", "true");
		g_enterprise_lic.addField("QIFENG_FLAG", "varchar(20)", "DEFAULT 'false'", "", "true");
		g_enterprise_lic.addField("REPORTMERGE_FLAG", "varchar(20)", "DEFAULT 'false'", "", "true");
		g_enterprise_lic.addField("SIGN_FILE_MAX", "varchar(20)", " DEFAULT '10'", "", "true");
		g_enterprise_lic.addField("BE_KEY_FLAG", "varchar(2)", "DEFAULT '1'", "", "true");
		g_enterprise_lic.addField("SERVER_SIGN_FLOW", "varchar(2)", "DEFAULT '0'", "", "true");
		g_enterprise_lic.addField("AUTOMATIC_SIGNATURE_FLAG", "varchar(2)", "DEFAULT '0'", "", "true");
		g_enterprise_lic.addField("QRCODE", "varchar(10)", "DEFAULT 'false'", "", "true");
		g_enterprise_lic.addField("SHOW_DIR_MANAGE", "varchar(20)", "DEFAULT 'false'", "", "true");
		g_enterprise_lic.addField("LICENSE_IMPORT_TIME", "datetime", "", "", "true");
		g_enterprise_lic.addField("CREATE_TIME", "datetime", "", "", "true");
		g_enterprise_lic.addField("UPDATE_TIME", "datetime", "", "", "true");
		g_enterprise_lic.addField("SPARE1", "varchar(100)", "DEFAULT NULL", "", "true");
		g_enterprise_lic.addField("SPARE2", "varchar(100)", "DEFAULT NULL", "", "true");
		g_enterprise_lic.addField("SPARE3", "varchar(100)", "DEFAULT NULL", "", "true");
		MysqlUtils.syncTableStructure(g_enterprise_lic);
		//-end

		//-start
		DataTableObject g_enterprise_lic_list=new DataTableObject("g_enterprise_lic_list");
		g_enterprise_lic_list.addField("ID", "varchar(32)", "NOT NULL", "", "true");
		g_enterprise_lic_list.addField("LIC_NAME", "varchar(500)", "NOT NULL", "", "true");
		g_enterprise_lic_list.addField("LIC_PATH", "varchar(500)", "NOT NULL", "", "true");
		g_enterprise_lic_list.addField("ENTERPRISE_LIC_ID", "varchar(32)", "NOT NULL", "", "true");
		g_enterprise_lic_list.addField("CREATE_TIME", "datetime", "", "", "false");
		g_enterprise_lic_list.addField("CREATE_USER", "varchar(32)", "", "", "false");
		g_enterprise_lic_list.addField("SPARE1", "varchar(100)", "DEFAULT NULL", "", "true");
		g_enterprise_lic_list.addField("SPARE2", "varchar(100)", "DEFAULT NULL", "", "true");
		g_enterprise_lic_list.addField("SPARE3", "varchar(100)", "DEFAULT NULL", "", "true");
		MysqlUtils.syncTableStructure(g_enterprise_lic_list);
		//-end

		//35-start
		DataTableObject g_enterprise_regist=new DataTableObject("g_enterprise_regist");
		g_enterprise_regist.addField("ID", "varchar(32)", "NOT NULL", "", "true");
		g_enterprise_regist.addField("ENTERPRISE_NAME", "varchar(255)", "DEFAULT NULL", "", "false");
		g_enterprise_regist.addField("AVALIABLE_DATE", "varchar(255)", "DEFAULT NULL", "", "false");
		g_enterprise_regist.addField("SIGN_COUNT", "varchar(255)", "DEFAULT '3000'", "", "false");
		g_enterprise_regist.addField("CREATE_TIME", "datetime", "DEFAULT NULL", "", "false");
		g_enterprise_regist.addField("CREATE_USER", "varchar(32)", "DEFAULT NULL", "", "false");
		g_enterprise_regist.addField("NEW_AVALIABLE_DATE", "varchar(255)", "DEFAULT NULL", "最新可用日期", "false");
		g_enterprise_regist.addField("NEW_SIGN_COUNT", "varchar(255)", "DEFAULT '3000'", "最新可用签名份数", "false");
		g_enterprise_regist.addField("UPDATE_FLAG", "varchar(255)", "DEFAULT '1'", "是否已更新可用日期/最新可用签名份数 ，默认是已经更新过", "false");
		g_enterprise_regist.addField("VERSION", "varchar(255)", "", "安装版本", "false");
		g_enterprise_regist.addField("SIGNED_COUNT", "varchar(255)", "", "已签名份数", "false");
		g_enterprise_regist.addField("SYSTEM_TYPE", "varchar(32)", "DEFAULT '1'", "系统是试用还是正式 试用-1，正式-2", "false");
		g_enterprise_regist.addField("FORMAL_USE_TIME", "datetime", "", "正式使用时间", "false");
		g_enterprise_regist.addField("COLLECT_SQL_FLAG", "varchar(32)", "DEFAULT '2'", "是否收集用户签名信息1-不收集，2-收集", "false");
		g_enterprise_regist.addField("ALREADY_ACTIVE_TIMES", "varchar(32)", "DEFAULT '0'", "企业已激活次数", "false");
		g_enterprise_regist.addField("ACTIVE_TIMES", "varchar(32)", "DEFAULT '2'", "企业能激活的次数,默认2次", "false");
		g_enterprise_regist.addField("FEE_TYPE", "varchar(4)", "DEFAULT '1'", "1-签名份数收费  2-维护成本", "false");
		g_enterprise_regist.addField("SERVER_SIGN_FLOW", "varchar(10)", "DEFAULT '1'", "", "false");
		g_enterprise_regist.addField("AUTOMATIC_SIGNATURE_FLAG", "varchar(10)", "DEFAULT '0'", "", "false");
		g_enterprise_regist.addField("QRCODE", "varchar(10)", "DEFAULT 'false'", "", "false");
		MysqlUtils.syncTableStructure(g_enterprise_regist);
		//end
		//37-start
		DataTableObject g_e_regist_log=new DataTableObject("g_e_regist_log");
		g_e_regist_log.addField("ID", "varchar(32)", "NOT NULL", "", "true");
		g_e_regist_log.addField("G_ENTERPRISE_NAME", "varchar(255)", "DEFAULT NULL", "", "false");
		g_e_regist_log.addField("NEW_AVALIABLE_DATE", "varchar(255)", "DEFAULT NULL", "", "false");
		g_e_regist_log.addField("NEW_SIGN_COUNT", "varchar(255)", "DEFAULT NULL", "", "false");
		g_e_regist_log.addField("LAST_AVALIABLE_DATE", "varchar(255)", "DEFAULT NULL", "", "false");
		g_e_regist_log.addField("LAST_SIGN_COUNT", "varchar(255)", "DEFAULT '0'", "", "false");
		g_e_regist_log.addField("MESSAGE", "varchar(255)", "DEFAULT NULL", "", "false");
		g_e_regist_log.addField("TYPE", "INT(4)", "DEFAULT 0", "", "false");
		g_e_regist_log.addField("FEE_TYPE", "INT(4)", "DEFAULT 1", "", "false");
		g_e_regist_log.addField("CREATE_TIME", "datetime", "DEFAULT NULL", "", "false");
		g_e_regist_log.addField("CREATE_USER", "varchar(32)", "DEFAULT NULL", "", "false");
		MysqlUtils.syncTableStructure(g_e_regist_log);
		//end



	}
}
